package com.qianke.domain;

import java.util.HashMap;
import java.util.Map;

public class Constants {

    public static final String CODE_RESPONSE_SUCCESS = "200";
    /**
     * 参数错误
     */
    public static final String CODE_PARAM_ERROR = "501";
    /**
     * 业务异常
     */
    public static final String BIZ_SERVICE_ERROR = "502";
    /**
     * 服务器异常
     */
    public static final String CODE_SERVICE_ERROR = "503";
    /**
     * token失效
     */
    public static final String CODE_TOKEN_EXPIRE = "601";

    /**
     * 权限异常
     */
    public static final String PERMISSION_ERROR = "701";

    /**
     * 分钟
     */
    public static long SESSION_TIMEOUT = 60 * 24 * 3;

    /**
     * 小时
     */
    public static long ROLE_TIMEOUT = 24 * 7;


    public static String TOKEN_PREFIX = "session:token:";

    public static String CLOUD_URL = "http://imgs.hellokid.com/";

    //超级管理员
    public static final Integer ADMIN_USER_ID = 1;
    public static final String ADMIN_USER_NAME = "qianke_admin";
    public static final String ADMIN_ACCOUNT = "18516211375";
    public static final Map<String, String> VERIFY_CODE_CANAL = new HashMap<>();

    static {
        VERIFY_CODE_CANAL.put("register", "register");
        VERIFY_CODE_CANAL.put("trailLesson", "trailLesson");
        VERIFY_CODE_CANAL.put("changePassword", "changePassword");
    }
}


